package cn.zjj.pet.domain;

import cn.zjj.basic.domain.BaseDomain;
import cn.zjj.org.domain.Shop;
import cn.zjj.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Pet extends BaseDomain {
    //名字
    private String name;
    //成本价  钱相关用BigDecimal类型
    private BigDecimal costprice;
    //售价
    private BigDecimal saleprice;
    //品种
    private Long type_id;
    private PetType type;
    //图片路径
    private String resources;
    //上下架,状态
    private Integer state;
    //下架时间  不能new,new就给死了
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GTM+8")
    private Date offsaletime;
    //上架时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GTM+8")
    private Date onsaletime;
    //创建时间  这个可以new
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GTM+8")
    private Date createtime=new Date();
    //所属商店id
    private Long shop_id;
    private Shop shop;
    //用户id  谁买的狗
    private Long user_id;
    private User user;
    //寻主消息id  //如果有就说明是收购来的,如果==null就是自己养的
    private Long search_master_msg_id;


    //传参使用
    private PetDetail petDetail;

}